#include<iostream>
#include<cstring>
using namespace std;
const int N = 1e5 + 10;
char s[3][6];
int n, m;
int main()
{
    memset(s, '0', sizeof(s));
    cin >> n;   
    int x = n / 6;
    int y = n % 6;
    for (int i = 0; i < x; i++) {
        for (int j = 0; j < 6; j++) {
            s[i][j] = '1';
        }
    }
    for (int i = 0; i < y; i++) {
        s[x][i] = '1';
    }
    for (int i = 0; i < 3; i++) {
        for (int j = 0; j < 6; j++) {
            cout << s[i][j];
        }
        cout << endl;
    }
    return 0;
}